fix(agent): defer intake and provider web tools - #3536
Conversation
|
Warning Review limit reached
Next review available in: 14 seconds Enable usage-based reviews in Billing to review now. Otherwise, wait until the next included review is available. How can I continue?After more reviews become available, a review can be triggered using the To avoid repeated limits, reduce automatic review volume by pausing incremental auto-reviews earlier, using label-based review opt-in, excluding WIP or generated PR titles, or requesting reviews manually when the PR is ready. If your team needs uninterrupted high-volume reviews, an organization admin can enable usage-based reviews. How do review limits work?CodeRabbit enforces per-developer PR review limits for each organization. Most developers receive the normal plan review availability. For paid Pro and Pro+ PR reviews, CodeRabbit uses adaptive limits for sustained high-volume activity. When a developer's recent PR review activity reaches the 95th percentile or higher among CodeRabbit users, additional reviews become available more gradually as earlier reviews age out of the rolling window. Please refer docs for additional details. Review details⚙️ Run configurationConfiguration used: Repository UI Review profile: CHILL Plan: Pro Plus Run ID: 📒 Files selected for processing (1)
📝 WalkthroughWalkthroughThe change separates bootstrap tools from deferred tools, adds deterministic provider-native exposure definitions, filters provider execution by current visibility, and expands tests and documentation for activation, authorization, prompts, budgets, and runtime execution. ChangesDeferred provider-native tool exposure
Estimated code review effort: 4 (Complex) | ~45 minutes Sequence Diagram(s)sequenceDiagram
participant Model
participant AgentRuntime
participant ToolExposure
participant Provider
Model->>AgentRuntime: request available tools
AgentRuntime->>ToolExposure: resolve visible tools
ToolExposure-->>AgentRuntime: return visible names
AgentRuntime-->>Model: expose visible tools
Model->>AgentRuntime: call tool_search
AgentRuntime->>ToolExposure: activate deferred provider tool
ToolExposure-->>AgentRuntime: update exposure state
AgentRuntime->>Provider: execute visible provider tool
Provider-->>AgentRuntime: return tool result
AgentRuntime-->>Model: provide result and final response
Possibly related PRs
Suggested reviewers: 🚥 Pre-merge checks | ✅ 4 | ❌ 1❌ Failed checks (1 warning)
✅ Passed checks (4 passed)
✨ Finishing Touches 💡 1📝 Generate docstrings 💡
🧪 Generate unit tests (beta)
Comment |
There was a problem hiding this comment.
💡 Codex Review
Here are some automated review suggestions for this pull request.
Reviewed commit: 4be05673da
ℹ️ About Codex in GitHub
Your team has set up Codex to review pull requests in this repo. Reviews are triggered when you
- Open a pull request for review
- Mark a draft as ready
- Comment "@codex review".
If Codex has suggestions, it will comment; otherwise it will react with 👍.
Codex can also answer questions or update the PR. Try commenting "@codex address that feedback".
There was a problem hiding this comment.
Actionable comments posted: 2
🤖 Prompt for all review comments with AI agents
Verify each finding against current code. Fix only still-valid issues, skip the
rest with a brief reason, keep changes minimal, and validate.
Inline comments:
In `@docs/architecture/28-model-driven-tool-discovery.md`:
- Around line 81-93: Update the Execution gate description to remove “unchanged”
and explicitly describe both checks: prepareExecution revalidates remote
allowance through isRemoteToolNameAllowed, and provider-native exposure is
intersected with the current configured provider tools and selected-model
support before each step.
- Around line 41-45: Update the measurement section around the “initially
exposed = 1” metric to state that the hi fixture authorizes exactly 64 generated
tools and does not authorize load_skill, while preserving the explanation that
tool_search is the sole initially exposed tool.
🪄 Autofix
Fix all unresolved CodeRabbit comments on this PR:
- Push a commit to this branch (recommended)
- Create a new PR with the fixes
ℹ️ Review info
⚙️ Run configuration
Configuration used: Repository UI
Review profile: CHILL
Plan: Pro Plus
Run ID: b2637b89-46a2-427e-8e48-e600b485c248
📒 Files selected for processing (6)
docs/architecture/28-model-driven-tool-discovery.mddocs/guides/agents.mddocs/guides/tools.mdsrc/agent/runtime/tool-exposure-runtime.test.tstests/chat/agent-runtime-streaming.test.tstests/docs/guide-content.test.ts
🚧 Files skipped from review as they are similar to previous changes (1)
- src/agent/runtime/tool-exposure-runtime.test.ts
Summary
form_inputfrom the hosted bootstrap while keeping it searchable and checkpoint-restorabletool_searchactivates oneRelates to veryfront/veryfront-issue-inbox#354.
Verification
deno test --no-check --allow-all --parallel src/agent/runtime src/agent/hosted(932 passed)deno task verify:quickdeno task test:unit(3,785 passed, 0 failed, 1 ignored)deno task audit(0 vulnerabilities)Summary by CodeRabbit
New Features
Bug Fixes
Documentation